package cn.k23.mapper;
//import cn.k23.entity.UserLog;
import cn.k23.entity.UserLog;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Description: 用户日志信息处理
 * @Author: k23
 * @Date: 2022-03-30 14:29
 * @Version: 1.0
 */

@Service
public interface UserLogMapper {
    @Insert("insert into t_userlog(account,info,create_ip) value(#{account},#{info},#{ip})")
    public int insert(Map<String,String> map);

    @Select("select id,account,info,create_time ct,create_ip cip from t_userlog order by id desc")
    public List<UserLog> queryAll();

    @Select("select id,account,info,create_time ct,create_ip cip from t_userlog where account = #{account} order by id desc")
    public List<UserLog> query(String account);
}
